home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / Alignment.java < prev    next >
Text File  |  1998-08-07  |  2KB  |  62 lines

  1. package com.symantec.itools.swing;
  2.  
  3.  
  4. import java.beans.PropertyVetoException;
  5.  
  6.  
  7. /**
  8.  * Alignment is an interface for components with labels that can be
  9.  * aligned left, centered, or right.
  10.  */
  11. public interface Alignment
  12. {
  13.     //--------------------------------------------------
  14.     // constants
  15.     //--------------------------------------------------
  16.  
  17.     /**
  18.      * Defines the "left" label text alignment style.
  19.      */
  20.     public static final int ALIGN_LEFT = 0;
  21.  
  22.     /**
  23.      * Defines the "center" label text alignment style.
  24.      */
  25.     public static final int ALIGN_CENTERED = 1;
  26.  
  27.     /**
  28.      * Defines the "right" label text alignment style.
  29.      */
  30.     public static final int ALIGN_RIGHT = 2;
  31.  
  32.  
  33.     //--------------------------------------------------
  34.     // methods
  35.     //--------------------------------------------------
  36.  
  37.     /**
  38.      * Sets the new label alignment style.
  39.      * @param style the new alignment style, one of ALIGN_LEFT,
  40.      * ALIGN_CENTERED, or ALIGN_RIGHT
  41.      * @exception PropertyVetoException
  42.      * if the specified property value is unacceptable
  43.      * @see #getAlignment
  44.      * @see #ALIGN_LEFT
  45.      * @see #ALIGN_CENTERED
  46.      * @see #ALIGN_RIGHT
  47.      */
  48.     public void setAlignment(int style)
  49.         throws PropertyVetoException;
  50.  
  51.     /**
  52.      * Gets the current label alignment style.
  53.      * @return the current alignment style, one of ALIGN_LEFT,
  54.      * ALIGN_CENTERED, or ALIGN_RIGHT
  55.      * @see #setAlignment
  56.      * @see #ALIGN_LEFT
  57.      * @see #ALIGN_CENTERED
  58.      * @see #ALIGN_RIGHT
  59.      */
  60.     public int getAlignment();
  61. }
  62.